
var Btn = document.querySelector('.three .search');

var Input = document.querySelector('.three input');

Btn.onclick = function () {
    axios.get('/user/search', { params: { searchkey: Input.value } }).then((res) => {
        render(res.data.list);
        console.log(res.data);
    })
}

function render(data) {
    var str = '';

    str = data.map((item, index) => {
        return `<tr>
        <td>
            <input type="checkbox">
        </td>
        <td>${item.num}</td>
        <td>${item.id}</td>
        <td>${item.name}</td>
        <td>${item.num}</td>
        <td>${item.status ? '正常' : '异常'}</td>
        <td>2022-10-19 20:20:20</td>
        <td>修改 删除</td>
    </tr>`
    })
}

